package stream.demo1;

import java.util.Arrays;
import java.util.List;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;

/**
 * @author ZH
 * https://www.jianshu.com/p/0c07597d8311
 */
public class StreamTest {
    public static void main(String[] args) {
        List<String> myList = Arrays.asList("a1", "a2", "b1", "c2", "c1");
        //myList.parallelStream() //并行流
        myList.stream()            //顺序流
                .filter(t->t.startsWith("c")) //过滤 留下来的
                .sorted()
                .map(String::toUpperCase)
                .sorted()
                .forEach(System.out::println);
    }
}
